package com.study.demo.gsbean.demo8;

/**
 * @author: elvin
 * @time: 2019-05-16 09:39
 * @desc:
 **/
public class Start {
    public static void main(String[] args) {
        //1. 就算是在父类中调用了  takeAShower 方法, 也还是会使用runMan中重写的takeAShower
        RunMan runMan = new RunMan();
        runMan.run();
        System.out.println("-------------------------");

        //2. 子类创建给父类引用, 最终的结果, 还是和上面是一样的
        AbstractRun abstractRun = new RunMan();
        abstractRun.run();
        System.out.println("----------------------------");

        IRun iRun= new RunMan();
        iRun.run();
        System.out.println("----------------------------");
    }
}
